package com.txc.pay.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.txc.pay.entity.AccountEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 支付商户账号配置表 服务类
 *
 * @author TXC
 * @since 2023-12-27
 */
public interface IAccountService extends IService<AccountEntity> {
    AccountEntity saveAndUpdate(AccountEntity account, MultipartFile file);

    List<AccountEntity> listByUserId(String userId, String payType);

    AccountEntity obtainDefaultAccount(String payType);

    void deleteById(String id);
    /**
     * 获取私钥文件
     *
     * @param id 账号id
     * @return
     */
    byte[] getPrivateKeyFile(String id);

    IPage<AccountEntity> getAccountPage(IPage<AccountEntity> page, String userId);

}
